#include "../../Headers/Classes/reservation.h"

Reservation::Reservation()
{
    setId(0);
    setClient(Client());
    setRoom(Room());
    setArrivalDate(QDate());
    setDepartureDate(QDate());
    setIsBuy(false);
}

Reservation::Reservation(int id, Client client, Room room, QDate arrivalDate, QDate departureDate, bool isBuy)
{
    setId(id);
    setClient(client);
    setRoom(room);
    setArrivalDate(arrivalDate);
    setDepartureDate(departureDate);
    setIsBuy(isBuy);
}

void Reservation::setId(int id)
{
    this->id = id;
}

void Reservation::setClient(Client client)
{
    this->client = client;
}

void Reservation::setRoom(Room room)
{
    this->room = room;
}

void Reservation::setArrivalDate(QDate arrivalDate)
{
    this->arrivalDate = arrivalDate;
}

void Reservation::setDepartureDate(QDate departureDate)
{
    this->departureDate = departureDate;
}

int Reservation::getId()
{
    return id;
}

Client Reservation::getClient()
{
    return client;
}

Room Reservation::getRoom()
{
    return room;
}

QDate Reservation::getArrivalDate()
{
    return arrivalDate;
}

QDate Reservation::getDepartureDate()
{
    return departureDate;
}

int Reservation::CountOfDates()
{
    //TODO высчитать кол-во дней проведенных в гостинице
    return 0;
}

void Reservation::setOptions(QList<AdvancedOption*> options)
{
    this->options = options;
}

QList<AdvancedOption*> Reservation::getOptions()
{
    return options;
}

void Reservation::setIsBuy(bool isBuy)
{
    this->isBuy = isBuy;
}

bool Reservation::getIsBuy()
{
    return isBuy;
}
